import React, { Component } from 'react';
import { Switch } from 'antd';

export const SwitchComponent = class extends Component {
    constructor(props) {
        super(props);
    }
    render() {
        return (
            <Switch 
             checkedChildren="开" 
             unCheckedChildren="关" 
             onChange={(checked) => this.props.onSwitchChange(checked)}
             defaultChecked />
        )
    }
}